<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <h:head>
        <title>Satın Almacı İhale Detayı Görüntüleme</title>
        <link href="../style.css" rel="stylesheet" type="text/css"></link>
        <div style="text-align: center;height:139px;background-color: #2D99FF"></div>

    </h:head>
    <h:body>

        <div id="wrapper">
            <div id="logo">

            </div>
            <div id="header">
                <!-- 		<div id="menu">
                
                        </div>    -->
            </div>
            <div class="page">
                <div id="page-bgtop">

                    <div id="dummy"></div>
                    <p:panel id="panelsidebar" header="Pages Menu">
                        <ui:include src="MenuSatinAlmaci.xhtml"/>
                    </p:panel>

                    <!-- end #sidebar -->
                     <div id="content">
                    <h:form prependId="false">
                       
                            <p:panel header="İhale Detayları">
                                <h:panelGrid columns="2" id="grid">

                                    <h:outputText value="İhale Adı: "/>
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.ad}" />

                                    <h:outputText value="Başlangıç Tarihi: "/>
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.baslamaTarihi}">
                                        <f:convertDateTime pattern="dd.MM.yyyy" />
                                    </h:outputText>
                                    <h:outputText value="Başlangıç Saati: "/>
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.baslangicSaati}">
                                        <f:convertDateTime pattern="HH:mm" />
                                    </h:outputText>
                                    <h:outputText value="Bitiş Tarihi: "/>
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.bitisTarihi}">
                                        <f:convertDateTime pattern="dd.MM.yyyy" />
                                    </h:outputText>
                                    <h:outputText value="Bitiş Saati: "/>
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.bitisSaati}" >
                                        <f:convertDateTime pattern="HH:mm" />
                                    </h:outputText>

                                    <h:outputText value="Satın Almacı : "/>
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.satinAlmaci.sirketAdi}"/>

                                    <h:outputText value="Açıklama : "/>
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.aciklama}" style="width:300px;height:100px;" />

                                    <h:outputText value="İhalenin Durumu : "  />
                                    <h:outputText value="#{satinalmacibean.secilenIhaleToGoruntule.donmaDurumu}"/>
                                    
                                    <h:outputText value="Döküman : "  />
                                    <p:commandButton value="#{satinalmacibean.secilenIhaleToGoruntule.belge}"  image="ui-icon ui-icon-link" ajax="false" rendered="#{satinalmacibean.belgevarmi}">
                                        <p:fileDownload value="#{satinalmacibean.file}" />
                                    </p:commandButton>

                                </h:panelGrid>
                                <h:panelGrid columns="2">
                                    <h:outputText value="Tedarikçiler: " />
                                    <h:dataTable id="datatable" var="ihale" value="#{satinalmacibean.listeTedarikciToIhaleGoruntule}" rows="10">
                                        <p:column>
                                            <p:fieldset legend="#{ihale.sirketAdi}" collapsed="true" toggleable="true" toggleSpeed="500">  
                                                <h:panelGrid columns="2">
                                                    <h:outputText value="Şirket Adı: "/>
                                                    <h:outputText value="#{ihale.sirketAdi}"/>
                                                    <h:outputText value="İlgili Kişi: "/>
                                                    <h:outputText value="#{ihale.ilgiliKisi}"/>
                                                    <h:outputText value="E-posta: "/>
                                                    <h:outputText value="#{ihale.eposta}"/>
                                                    <h:outputText value="Adres: "/>
                                                    <h:outputText value="#{ihale.adres}"/>
                                                    <h:outputText value="Web Site: "/>
                                                    <h:outputText value="#{ihale.webSite}"/>
                                                </h:panelGrid>
                                            </p:fieldset>
                                        </p:column>
                                    </h:dataTable>
                                </h:panelGrid>
                                </p:panel>
                                </h:form>
                                <h:form>



                                    <p:panel>
                                    <p:columnChart value="#{satinalmacibean.sonuc_teklifleri}" var="sonuc" xfield="#{sonuc.tedarikci.sirketAdi}">
                                        <p:chartSeries label="Minimum Teklif" value="#{sonuc.fiyat}" />
                                    </p:columnChart>




                                    <h:panelGrid>
                                        <h:outputText value="Kategori"/>
                                        <h:selectOneMenu id="kategori" value="#{satinalmacibean.secilenkategori}" required="true" requiredMessage="Önce Kategori Seçmelisiniz!">
                                            <f:selectItem itemLabel="Kategori Seçiniz" itemValue="" />
                                            <f:selectItems value="#{satinalmacibean.kategoriler}" />

                                        </h:selectOneMenu>                                     

                                    </h:panelGrid>
                                    <p:commandButton value="Grafik Değiştir"  ajax="false" action="#{satinalmacibean.kategoriye_gore_grafik_olustur}" ></p:commandButton>



                               

                                <h:messages style="color: red" />
                            </p:panel> 
 </h:form>
                        </div>
                        <!-- end #content -->
                    
                    <div style="clear: both;">&nbsp;</div>
                </div>

                <!-- end #page -->

            </div>
            <div id="footer-bgcontent">
                <div id="footer" align="center">
                    <p>İHALE YÖNETİM SİSTEMİ - 2011</p>
                </div>
            </div>
            <!-- end #footer -->
        </div>


    </h:body>
</html>